package com.uno.mapsearch.rest;

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.uno.mapsearch.model.Placemark;
import com.uno.mapsearch.model.Point;


@Path("/placemarks")
public class PlacemarkSearchRestService {

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public PlacemarkSearchResult getPlacemarks(){
		
		List<Placemark> placemarks = new ArrayList<Placemark>();
		
		Placemark placemark = new Placemark();
		placemark.setName("Manhattan Skyline");
		Point point = new Point(-73.9915788333333, 40.7084988333333);
		placemark.setPoint(point);
		placemarks.add(placemark);
		
		
		placemark = new Placemark();
		placemark.setName("Lower East Side");
		point = new Point(-73.9925443333333, 40.7102921666667);
		placemark.setPoint(point);
		placemarks.add(placemark);
		
		
		PlacemarkSearchResult placemarkSearchResult = new PlacemarkSearchResult(placemarks);
		return placemarkSearchResult;
	}
}
